<?php $this->load->view('common/head');?>
<form class="form-inline" name="add" id="add" action="<?php echo $this->input->server('REQUEST_URI'); ?>" method="post">
<div class="panel panel-default">
  <!-- Default panel contents -->
  <div class="panel-heading">申报审核时间管理</div>

  <!-- Table -->
  <table class="table table-condensed">
    <tbody>
      <tr>
        <td class="col-md-2">申报发布开始时间：</td>
        <td><input type="input" required class="form-control" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endTime\')}'})" name="startTime" id="startTime" value="<?php echo $spreadApplyTime['startTime'] ? date("Y-m-d H:i:s", $spreadApplyTime['startTime']) : '' ?>" placeholder="开始时间">
        </td>
      </tr>
      <tr>
        <td class="col-md-2">申报发布结束时间：</td>
        <td><input type="input" required class="form-control" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'startTime\')}'})" name="endTime" id="endTime" value="<?php echo $spreadApplyTime['endTime'] ? date("Y-m-d H:i:s", $spreadApplyTime['endTime']) : '' ?>" placeholder="结束时间"></td>
      </tr>
      <tr>
      	<td colspan="2" align="center">
      		<button class="btn btn-default btn-sm buttona" role="button" href="<?php echo printUrl('SpreadBudget','storeAdd'); ?>">提交</button>
      		<button class="btn btn-default btn-sm buttona" role="button"  onclick="closeWindow()">取消</button>
      	</td>
      </tr>
    </tbody>
  </table>
</div>
</form>
<script type="text/javascript">
$(function(){
	initValidation();
});
//初始化验证
function initValidation(){
	$('form[name="add"]').find("input,select,textarea").jqBootstrapValidation("destroy");
	$('form[name="add"]').find("input,select,textarea").not("[type=submit]").jqBootstrapValidation({
	    preventSubmit:false,
	    submitSuccess: function (form, event) {
	         event.preventDefault();
	         ajaxFormSubmit('add');
	     },
	     submitError: function (form, event, errors) {
	       event.preventDefault();
	       }
  	});
}
</script>
<?php $this->load->view('common/foot');?>